<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>提交办理</title>
		<link rel="stylesheet" href="../../vendor/bootstrap-3.3.7/css/bootstrap.min.css" />
		<link rel="stylesheet" href="../../css/submitToDealWith.css" />
		<link rel="stylesheet" href="../../vendor/zTree_v3/css/zTreeStyle/zTreeStyle.css" />
	</head>

	<body>
		<div class="submit-to-deal-with">
			<div class="stodw-main">
				<div class="stdw-organization active">
					<div class="stdw-title">组织机构</div>
					<div class="stdw-content">
						<div class="select">
							<ul id="tree" class="ztree"></ul>
						</div>
					</div>
				</div>
				<div class="stdw-candidates">
					<div class="stdw-title">候选人员</div>
					<div class="stdw-content">
						<div class="stdw-c-list">
							<ul>
								<li>
									<i class="glyphicon glyphicon-triangle-right"></i>
									<span title="李白">李白(血管科)</span>
								</li>
								<li class="active">
									<i class="glyphicon glyphicon-triangle-right"></i>
									<span title="李白">李白李白李白李白李白李白李白李白李白李白</span>
								</li>
							</ul>
						</div>
					</div>
				</div>
				<div class="stdw-handle">
					<button class="btn btn-default">全选<span class="glyphicon glyphicon-chevron-right"></span></button>
					<button class="btn btn-default"><span class="glyphicon glyphicon-chevron-left"></span>还原</button>
				</div>
				<div class="stdw-selected">
					<div class="stdw-title">选中人员</div>
					<div class="stdw-content">
						<div class="stdw-s-list">
							<ul>
								<li>
									<i class="glyphicon glyphicon-triangle-right"></i>
									<span title="李白">李白</span>
								</li>
								<li class="active">
									<i class="glyphicon glyphicon-triangle-right"></i>
									<span title="李白">李白</span>
								</li>
							</ul>
						</div>
					</div>
				</div>
			</div>
			<div class="checkbox">
				<label>
      			<input type="checkbox">发送短信通知
    		</label>
			</div>
			<div class="stdw-close">
				<button class="btn btn-default">确定</button>
				<button class="btn btn-default">取消</button>
			</div>
		</div>

		<script type="text/javascript" src="../../vendor/jquery1.9.min.js"></script>
		<script type="text/javascript" src="../../vendor/bootstrap-3.3.7/js/bootstrap.min.js"></script>
		<script type="text/javascript" src="../../vendor/zTree_v3/js/jquery.ztree.core.min.js"></script>
		<script>
			$(".stdw-close").on("click", "button", function(e) {
				window.close();
			});
			var setting = {
				view: {
					showIcon: false,
					showLine: false,
					nameIsHTML: true,
				},
				data: {
					simpleData: {
						enable: true
					}
				},
				callback: {
					onClick: zTreeOnClick
				}
			};

			var zNodes = [{
					id: 1,
					pId: 0,
					name: "父节点1 - 展开",
					open: true
				},
				{
					id: 11,
					pId: 1,
					name: "父节点11 - 折叠"
				},
				{
					id: 111,
					pId: 11,
					name: "叶子节点111"
				},
				{
					id: 112,
					pId: 11,
					name: "叶子节点112"
				},
				{
					id: 113,
					pId: 11,
					name: "叶子节点113"
				},
				{
					id: 114,
					pId: 11,
					name: "叶子节点114"
				},
				{
					id: 12,
					pId: 1,
					name: "父节点12 - 折叠"
				},
				{
					id: 121,
					pId: 12,
					name: "叶子节点121"
				},
				{
					id: 122,
					pId: 12,
					name: "叶子节点122"
				},
				{
					id: 123,
					pId: 12,
					name: "叶子节点123"
				},
				{
					id: 124,
					pId: 12,
					name: "叶子节点124"
				},
				{
					id: 13,
					pId: 1,
					name: "父节点13 - 没有子节点",
				},
				{
					id: 2,
					pId: 0,
					name: "父节点2 - 折叠"
				},
				{
					id: 21,
					pId: 2,
					name: "父节点21 - 展开",
					open: true
				},
				{
					id: 211,
					pId: 21,
					name: "叶子节点211"
				},
				{
					id: 212,
					pId: 21,
					name: "叶子节点212"
				},
				{
					id: 213,
					pId: 21,
					name: "叶子节点213"
				},
				{
					id: 214,
					pId: 21,
					name: "叶子节点214"
				},
				{
					id: 22,
					pId: 2,
					name: "父节点22 - 折叠"
				},
				{
					id: 221,
					pId: 22,
					name: "叶子节点221"
				},
				{
					id: 222,
					pId: 22,
					name: "叶子节点222"
				},
				{
					id: 223,
					pId: 22,
					name: "叶子节点223"
				},
				{
					id: 224,
					pId: 22,
					name: "叶子节点224"
				},
				{
					id: 23,
					pId: 2,
					name: "父节点23 - 折叠"
				},
				{
					id: 231,
					pId: 23,
					name: "叶子节点231"
				},
				{
					id: 232,
					pId: 23,
					name: "叶子节点232"
				},
				{
					id: 233,
					pId: 23,
					name: "叶子节点233"
				},
				{
					id: 234,
					pId: 23,
					name: "叶子节点234"
				},
				{
					id: 3,
					pId: 0,
					name: "父节点3 - 没有子节点",
				}
			];

			function zTreeOnClick(event, treeId, treeNode) {
				alert(treeNode.id + ", " + treeNode.name );
			};
			$.fn.zTree.init($("#tree"), setting, zNodes);
		</script>
	</body>

</html>